<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model app\models\User */

$this->title = 用户资料;
$this->params['breadcrumbs'][] = ['label' => Yii::t('User', 'Users')];
$this->params['breadcrumbs'][] = $model->user_name;
?>
<div class="user-view">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a(Yii::t('User', 'Update'), ['update', 'id' => $model->user_id], ['class' => 'btn btn-primary']) ?>
      <!--  <?= Html::a(Yii::t('User', 'Delete'), ['delete', 'id' => $model->user_id], [
            'class' => 'btn btn-danger',
            'data' => [
                'confirm' => Yii::t('User', 'Are you sure you want to delete this item?'),
                'method' => 'post',
            ],
        ]) ?>--!>
    </p>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
   //         'user_id',
            'user_name',
            'nick_name',
            'email',
            [
                'label'=> Yii::t('User', 'Role'),
                'value' => $model->getRole(),
            ],
   //         'last_login_date',
   //         'last_login_ip',
  //          'login',
   //         'status',
   //         'expired_date',
   //         'session_id',
            'register_date',
       ],
    ]) ?>

</div>
